import request from '@/utils/request'

// 查询采购退货统计列表
export function listReturn(query) {
  return request({
    url: '/report/scmPurchase/return/list',
    method: 'get',
    params: query
  })
}

// 查询采购退货统计详细
export function getReturn(materialId) {
  return request({
    url: '/report/scmPurchase/return/' + materialId,
    method: 'get'
  })
}

// 新增采购退货统计
export function addReturn(data) {
  return request({
    url: '/report/scmPurchase/return',
    method: 'post',
    data: data
  })
}

// 修改采购退货统计
export function updateReturn(data) {
  return request({
    url: '/report/scmPurchase/return',
    method: 'put',
    data: data
  })
}

// 删除采购退货统计
export function delReturn(materialId) {
  return request({
    url: '/report/scmPurchase/return/' + materialId,
    method: 'delete'
  })
}

// 导出采购退货报表统计
export function exportReturn(query) {
  return request({
    url: '/report/scmPurchase/return/export',
    method: 'get',
    params: query
  })
}